function getStyle(obj, name) {
    if (obj.currentStyle) {
        return obj.currentStyle[name];
    }
    else {
        return getComputedStyle(obj, false)[name];
    }
}

function toMove(obj, property, iTag, funEnd) {
    /* var timer = null;*/

    clearInterval(obj.timer);
    obj.timer = setInterval(function () {
        var cur = 0;

        if (property === 'opacity') {
            cur = Math.round(parseFloat(getStyle(obj, property))*100
            );
        }
        else {
            cur = parseInt(getStyle(obj, property));
        }

        var speed = (iTag - cur)/2;

        speed = speed>0? Math.ceil(speed): Math.floor(speed);


        if (iTag === cur) {
            clearInterval(obj.timer);

            if (funEnd) {
                funEnd();
            }
        }
        else {
            if (property === 'opacity') {
                obj.style.opacity = (cur + speed)/100;
                obj.style.filter = 'alpha(opacity: ' + (cur + speed) + ')';

            }
            else {
                obj.style[property] = cur + speed + 'px';
            }
        }

    }, 30);
}

function getByClass(oParent, sClass) {
    var aEle = oParent.getElementsByTagName('*');
    var aResult = [];
    for (var i=0; i<aEle.length; i++) {
        if (aEle[i].className === sClass) {
            aResult.push(aEle[i]);
        }
    }
    return aResult;
}
